<?php
/** Coolstor Define */
require_once 'Define.php';

/** Zend_Application */
require_once 'Zend/Application.php';

// Create application, bootstrap, and run
$application = new Zend_Application(
    APPLICATION_ENV,
    APPLICATION_PATH . '/configs/application.ini'
);

$timezone_identifier = "PRC";  //本地时区标识符
date_default_timezone_set($timezone_identifier);

// Code for Session Cookie workaround
if (isset($_POST["PHPSESSID"])) {
	session_id($_POST["PHPSESSID"]);
} else if (isset($_GET["PHPSESSID"])) {
	session_id($_GET["PHPSESSID"]);
}
	
try {
$application->bootstrap()->run();
	
} catch (Exception $e) {
	header("Content-type:text/html;charset=utf-8");
	echo "网站更新中,敬请期待......";
	exit(0);
// 	var_dump($e);
}

// $debug = false;

// if($debug){
// 	$application->bootstrap()
// 	->run();
// }

// try {
// 	if(!$debug){
// 		$application->bootstrap()
// 		->run();
// 	}
// } catch (Exception $e) {
// 	//TODO 20121101[1]
// 	//跳转到系统维护页面
// 	var_dump($e);
// }